remove last character from string php

36

$string = rtrim($string, ',');
echo substr($string, 0, -3);
$newarraynama = rtrim($arraynama, ", ");

Comments

Submit
0 Comments